#include "Rayon.hpp"

#include "Algebre/Coord.hpp"

#include "Formes/CubeTroue.hpp"

#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
  CubeTroue cube( Coord( 0., 0., 3. ), VecteurU( 1., 0., 0. ),  VecteurU( 0., 1., 0. ), 1. );

  Coord A(5., 0., 0.);
  VecteurU v(-1., 0., 0.);
  
//   cout << "Point " << tore.get_point() << ", axe " << tore.get_axe()
//        << ", grand rayon " << tore.get_grand() << ", petit rayon "
//        << tore.get_petit() << endl;

  Coord inter( cube.trouveIntersection( Rayon( A, VecteurU( -1., 0., 0. ) ) ) );

  cout << "Intersection : " << inter << ", normale : " << cube.normale( inter )
       << endl;
  cout << "*****************************************************************************" << endl;

  inter = cube.trouveIntersection( Rayon( Coord( 0., 0., 3.5 ), Coord( 0., 0., -1. ) ) );
  cout << "Intersection : " << inter << ", normale : " << cube.normale( inter )
       << endl;
  cout << "*****************************************************************************" << endl;

  return 0;
}
